<?php
/**
 * This class returns an array with the xhtml code of a textarea and if set an error, info and a title.
 *
 * @author Redouane Benkaddour <redouane@indago.nl>
 * @version 0.5.2
 * @package reform
 * @subpackage textarea
 */
class textarea extends textarea_generator {
	/**
    * Constructor of this class wich need a parameter to set the name attribute of the textarea.
    *
    * @param string $name
    * @return void
    */
	public function __construct($name){
		$this->attribute['name'] = $name;
	}
	
	/**
    * This function uses a function to generate the xhtml code of a textarea and returns the data in an array
    *
    * @return array $component
    */
	public function create(){
		if(isset($_REQUEST[$this->attribute['name']])){
			$this->SetValue($_REQUEST[$this->attribute['name']]);
		}

		$this->component['content'] = $this->generateCode();
		return $this->component;
	}
}

?>